package com.le.tester.book.concurrentjavafight.l7_1_7;

import com.le.tester.webpage.periodCallback.Callback;
import org.apache.commons.lang3.time.DateUtils;
import org.junit.runner.notification.RunListener;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.concurrent.*;

/**
 * createTime：2022/11/10 14:30
 * description：
 */
@RunListener.ThreadSafe
public class CancellingExecutor extends ThreadPoolExecutor {
    public CancellingExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue) {
        super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue);
    }
//    protected <T> RunnableFuture<T> newTaskFor(Callable<T> callable) {
//        if (callable instanceof CancellableTask)
//            return ((CancellableTask<T>) callable).newTask();
//        else
//            return super.newTaskFor(callable);
//    }
//
//    public abstract class SocketUsingTask<T> implements CancellableTask<T> {
//
//    }
}
